<%-- 
    Document   : recipe
    Created on : 23.05.2012, 08:14:08
    Author     : tamara
--%>

<%@page import="model.Recipe"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/main.css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Recipe</title>
    </head>
    <body>
        <div class="container">
            <h1>Recipe</h1>

            <%
                ArrayList<Recipe> a_recipe = (ArrayList<Recipe>) request.getAttribute("recipe");
                out.println("Cocktail: " + a_recipe.get(0).getCocktailname());
            %>
            </br></br>
            <table border="1">
                <tr>
                    <th>Ingredient</th>
                    <th>Amount</th>
                    <th>Unit</th>
                </tr>
                <%
                    for (Recipe recipe : a_recipe) {
                        out.println("<tr>");
                        out.println("<th>" + recipe.getIngredientname() + "</th>");
                        out.println("<th>" + recipe.getMenge() + "</th>");
                        out.println("<th>" + recipe.getUnit() + "</th>");
                    }
                %>
            </table>
            <br/>
            <INPUT type=button VALUE="back" onClick="history.go(-1)">
            <INPUT type=button VALUE="start" onClick="history.go(-3)">
        </div>
    </body>
</html>
